import request from '@/utils/request'
/**
 * 租房小组
 * @returns Promise
 */
export const rentTeamApi = () => {
  return request({
    url: '/home/groups'
  })
}
/**获取热门城市列表
 * @returns Promise
 */
export const getHotCityListApi = () => {
  return request({
    url: '/area/hot'
  })
}
/**获取城市列表
 * @returns Promise
 */
export const getCityListApi = (level) => {
  return request({
    url: '/area/city',
    params: {
      level
    }
  })
}
/**
 * 根据城市名称查询该城市信息
 * @param {string} name 城市名称
 * @returns Promise
 */
export const getCityInfoApi = (name) => {
  return request({
    url: '/area/info',
    params: {
      name
    }
  })
}
/**
 * 获取城市子级列表
 * @returns Promise
 */
export const getCityChildrenApi = (id) => {
  return request({
    url: '/area',
    params: { id }
  })
}
